import collections
class Solution(object):
    def findRepeatedDnaSequences(self, s):
        """
        :type s: str
        :rtype: List[str]
        """
        DNA = collections.defaultdict(int)
        if len(s) < 10:
            return []
        return_list = []
        for i in range(0, len(s) - 9):
            DNA[s[i: i + 10]] += 1
            if DNA[s[i: i + 10]] == 2:
                return_list.append(s[i: i + 10])
        return return_list


data = Solution()
s = "AAAAAAAAAAAAA"
print(data.findRepeatedDnaSequences(s))
